#!/bin/bash

#convert XSD documents to Java classes

PARIS_PATH="/home/xjuraj/Projects/master-thesis/Paris"
OUT_PROJECT="common-utils"
SOURCE_PATH="src/main/java"
OUT_PCKG="sk.lieskove.jianghongtiao.common.generated"

#         -d <dir>           :  generated files will go into this directory
#         -p <pkg>           :  specifies the target package
#         -readOnly          :  generated files will be in read-only mode
#         -npa               :  suppress generation of package level annotations (**/package-info.java)
#         -mark-generated    :  mark the generated code as @javax.annotation.Generated

cd "$PARIS_PATH"
#convert Agent Settings -p "$OUT_PCKG"
xjc -d "$OUT_PROJECT/$SOURCE_PATH" -readOnly -npa  -mark-generated "$PARIS_PATH/settings/xml-schema/AgentSettings.xsd"
